package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.MeowPurchaseOrderDetailsMapper;
import com.ruoyi.system.domain.MeowPurchaseOrderDetails;
import com.ruoyi.system.service.IMeowPurchaseOrderDetailsService;
import com.ruoyi.common.core.text.Convert;

/**
 * 采购订单明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-24
 */
@Service
public class MeowPurchaseOrderDetailsServiceImpl implements IMeowPurchaseOrderDetailsService 
{
    @Autowired
    private MeowPurchaseOrderDetailsMapper meowPurchaseOrderDetailsMapper;

    /**
     * 查询采购订单明细
     * 
     * @param detailId 采购订单明细主键
     * @return 采购订单明细
     */
    @Override
    public MeowPurchaseOrderDetails selectMeowPurchaseOrderDetailsByDetailId(String detailId)
    {
        return meowPurchaseOrderDetailsMapper.selectMeowPurchaseOrderDetailsByDetailId(detailId);
    }

    /**
     * 查询采购订单明细列表
     * 
     * @param meowPurchaseOrderDetails 采购订单明细
     * @return 采购订单明细
     */
    @Override
    public List<MeowPurchaseOrderDetails> selectMeowPurchaseOrderDetailsList(MeowPurchaseOrderDetails meowPurchaseOrderDetails)
    {
        return meowPurchaseOrderDetailsMapper.selectMeowPurchaseOrderDetailsList(meowPurchaseOrderDetails);
    }

    /**
     * 新增采购订单明细
     * 
     * @param meowPurchaseOrderDetails 采购订单明细
     * @return 结果
     */
    @Override
    public int insertMeowPurchaseOrderDetails(MeowPurchaseOrderDetails meowPurchaseOrderDetails)
    {
        return meowPurchaseOrderDetailsMapper.insertMeowPurchaseOrderDetails(meowPurchaseOrderDetails);
    }

    /**
     * 修改采购订单明细
     * 
     * @param meowPurchaseOrderDetails 采购订单明细
     * @return 结果
     */
    @Override
    public int updateMeowPurchaseOrderDetails(MeowPurchaseOrderDetails meowPurchaseOrderDetails)
    {
        return meowPurchaseOrderDetailsMapper.updateMeowPurchaseOrderDetails(meowPurchaseOrderDetails);
    }

    /**
     * 批量删除采购订单明细
     * 
     * @param detailIds 需要删除的采购订单明细主键
     * @return 结果
     */
    @Override
    public int deleteMeowPurchaseOrderDetailsByDetailIds(String detailIds)
    {
        return meowPurchaseOrderDetailsMapper.deleteMeowPurchaseOrderDetailsByDetailIds(Convert.toStrArray(detailIds));
    }

    /**
     * 删除采购订单明细信息
     * 
     * @param detailId 采购订单明细主键
     * @return 结果
     */
    @Override
    public int deleteMeowPurchaseOrderDetailsByDetailId(String detailId)
    {
        return meowPurchaseOrderDetailsMapper.deleteMeowPurchaseOrderDetailsByDetailId(detailId);
    }
}
